<div ng-controller="z-schedulWeek-c" z-loading is-loading="viewModel.isLoading">
	<div viewstack class="carousel slide" data-ride="carousel">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
	                       <li>
		                        <i class="im-home"></i>
		                        <a href="index.html">首页</a>
	                        </li>
	                        <li ng-repeat="menu in viewModel.menuList">
	                        	<i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
	                        	<i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
	                        	{{menu.label}}
	                        </li>
                        </ul>
                    </div>
                </div>
                <div class="outlet">
	                <div class="panel-body">
	                    <form class="form-horizontal group-border hover-stripped" role="form">
	                        <div class="row">
	                            <div class="col-lg-4 col-md-1">
	                            	<button class="btn btn-lime" ng-click="viewModel.bindData()" tabIndex="1">刷新</button>
	                            	&nbsp
									<button class="btn btn-success" ng-click="viewModel.add(1)" tabIndex="2">新增按周班次</button>
									&nbsp
									<button class="btn btn-success" ng-click="viewModel.add(2)" tabIndex="3">新增无规律班次</button>
	                            </div>
	                        </div>
	                    </form>
	                </div>
                </div>
				<div class="container-fluid">
					<div class="row">
						<!-- <table class="table table-striped  table-bordered table-hover"> -->
						<table class="table table-striped table-bordered" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th>班次名称</th>
									<th>班次类型</th>
									<th width="6%">人员</th>
									<th>考勤时间</th>
									<th width="9%">开始日期</th>
									<th width="9%">结束日期</th>
									<th width="10%">是否根据法定<br>节假日调休状态</th>
									<th width="6%">默认状态</th>
									<th width="14%">操作</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="schedulWeek in viewModel.dataList">
									<td>{{schedulWeek.swName}}</td>
									<td ng-switch="schedulWeek.swType">
										<span ng-switch-when="1">按周班次</span>
										<span ng-switch-when="2">无规律班次</span> 
									</td>
									<td>
										<span ng-if="schedulWeek.employeeSum==null">0</span>
										<span ng-if="schedulWeek.employeeSum!=null">{{schedulWeek.employeeSum}}</span>
										/人
									</td>
									<td>
										<span ng-if="schedulWeek.startFromTime!=null">
											{{schedulWeek.startFromTime}}-{{schedulWeek.startToTime}} 间隔：{{schedulWeek.startInterval}}
											<br>
											{{schedulWeek.endFromTime}}-{{schedulWeek.endToTime}} 间隔：{{schedulWeek.endInterval}}
										</span>
										<span ng-if="schedulWeek.startFromTime==null">
											不同打卡时间
										</span>
									</td>
									<td>{{schedulWeek.fromDate | date:'yyyy/MM/dd'}}</td>
									<td>{{schedulWeek.thruDate | date:'yyyy/MM/dd'}}</td>
									<td ng-switch="schedulWeek.isHoliday">
										<span ng-switch-when="1">是</span>
										<span ng-switch-when="0">否</span> 
									</td>
									<td>
										<span ng-if="schedulWeek.isDefault==1">是</span>
									</td>
									<td>
										<button type="button" class="btn btn-primary btn-sm" ng-click="viewModel.update(schedulWeek)">修改</button>
										<button type="button" class="btn btn-danger btn-sm" ng-disabled="viewModel.isDisabled(schedulWeek)" ng-click="viewModel.del(schedulWeek)">删除</button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<z-Dialog show-Save-Btn="viewModel.showSaveBtn" 
			have-Error-Class="false" 
			load-Url="static/html/schedulWeek/schedulWeekEdit.html" 
			title="{{editModel.title}}" 
			show="viewModel.show"
			cancel-fn="viewModel.unLoad()"
			save-fn="viewModel.save()"
			body-Height="editModel.bodyHeight"></z-Dialog>
    <z-Dialog show-Save-Btn="viewModel.showSaveBtn"
           have-Error-Class="false"
           load-Url="static/html/schedulWeek/selectEmployee.html"
    	   title="{{viewEmployeeModel.title}}"
    	   show="viewEmployeeModel.show"
           save-fn="viewEmployeeModel.saveEmployee()"
           cancel-fn="viewEmployeeModel.unLoad()"></z-Dialog>
	<z-Dialog show-Save-Btn="true" 
			have-Error-Class="false" 
			load-Url="static/html/schedulWeek/selectPunchTime.html" 
			title="{{viewPunchTimeModel.title}}" 
			show="viewPunchTimeModel.show"
			cancel-fn="viewPunchTimeModel.unLoad()"
			save-fn="viewPunchTimeModel.save()"
			body-Height="480"></z-Dialog>
	<z-Dialog show-Save-Btn="false" 
			have-Error-Class="true" 
			load-Url="static/html/schedulWeek/selectHoliday.html" 
			title="{{viewHolidayModel.title}}" 
			show="viewHolidayModel.show"
			cancel-fn="viewHolidayModel.unLoad()"
			save-fn="viewHolidayModel.save()"></z-Dialog>
</div>